home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / x11 / strategy / xpat2-1.000 / xpat2-1 / xpat2-1.04 / src / Imakefile < prev    next >
Makefile  |  1995-11-25  |  6KB  |  217 lines

  1. # Imakefile for xpat2 version 1.04
  2. #
  3. # ****************************************************************************
  4.  
  5. # customizing:
  6. #
  7. # 0.) extra warnings for gcc and development
  8. #
  9. #undef EXTRA_WARNINGS
  10. # 1.) specify, which interface to use (exactly one of the interfaces below)
  11. #undef useXlib        /* similar to xpat version 1.x, not all features */
  12. #define useXaw        /* the recommended interface for xpat2 */
  13. #undef useMotif    /* too buggy yet */
  14. #undef useXview    /* in development */
  15.  
  16. # 2.) specify, if you want online help (Athena Widgets only)
  17. #define USE_ONLINEHELP
  18.  
  19. # 3.) specify, if you want round cards (nicer, but you need Xmu)
  20. #define USE_ROUND_CARDS
  21.  
  22. # 4.) specify, if you want sound (must copy the appropriate sound module)
  23. #     SOUNDOBJ should be one module of X-sound_*.o if USE_SOUND is on, else empty
  24. #     Note: for X-sound_SUN.o, /dev/audio must have 666 permissions */
  25. #define USE_SOUND    /* doesn't harm if you don't have a sound card */
  26. SOUNDOBJ = X-sound_SUN.o
  27.  
  28. # 5.) specify, if you want the antialiased card construction set (SLOW!)
  29. #define USE_CARD_CONSTRUCTION
  30.  
  31. # 6.) if you answered NO to 5.): Do you want support for full xpm cards?
  32. #define USE_XPM
  33.  
  34. # 7.) if you answered NO to 5.): Do you want to load external bitmap cards?
  35. #define USE_LOADCARDS
  36.  
  37. # BINDIR and LIBDIR should be predefined by the templates
  38. # BINDIR = /usr/bin/X11
  39. # LIBDIR = /usr/lib/X11
  40. XPATLIBDIR = /usr/games/lib/xpat
  41. APPDEFSDIR = $(LIBDIR)
  42. XPATMANDIR = /usr/man/man6
  43.  
  44. # This is the name of the log-file, where solved games are stored:
  45. # an alternative path would be $(XPATLIBDIR)/xpat.log
  46. SCOREFILE = /var/games/xpat.log
  47.  
  48.  
  49. # paths for installation in user's home-directory.
  50. LXPATBINDIR = $(HOME)/bin
  51. LXPATMANDIR = $(HOME)/xpat
  52. LAPPDEFSDIR = $(HOME)
  53.  
  54. # xpat2 needs to know where the xpm library resides (if needed)
  55. XPMLIB             = -L$(USRLIBDIR) -lXpm
  56. XPMINCLUDE        = -I $(INCDIR)
  57.  
  58. # *****************************************************************************
  59. # I hope you don't need to change anything below this point
  60. # *****************************************************************************
  61. #if defined(HPArchitecture) || defined(AIXArchitecture)
  62. CC = c89
  63. CCOPTIONS =
  64. #else
  65. CC = gcc
  66. #ifdef EXTRA_WARNINGS
  67. CCOPTIONS = -O2 -pipe -ansi -fno-common -Wall -Wshadow -Wpointer-arith \
  68.     -Wcast-qual -Wcast-align -Waggregate-return \
  69.     -Wstrict-prototypes -Wmissing-prototypes \
  70.     -Wnested-externs -Wwrite-strings
  71. #else
  72. CCOPTIONS = -O2 -pipe -ansi -fno-common -Wall
  73. #endif
  74. #endif
  75.  
  76. #ifdef useXlib
  77. KIT_OPTION = -DuseXlib
  78. #ifdef USE_ROUND_CARDS
  79. KIT_LIBS = $(XMULIB) $(XLIB)
  80. #else
  81. KIT_LIBS = $(XLIB)
  82. #endif
  83. KIT_OBJS = Xlib-buttons.o Xlib-main.o Xlib-windows.o Xlib-events.o
  84. DEPLIBS = $(DEPXLIB)
  85. #endif
  86. #ifdef useXaw
  87. KIT_OPTION = -DuseXaw
  88. KIT_LIBS = XawClientLibs # $(XMULIB) $(XTOOLLIB)
  89. KIT_OBJS = Xaw-main.o Xaw-help.o
  90. DEPLIBS = XawClientDepLibs
  91. #endif
  92. #ifdef useMotif
  93. KIT_OPTION = -DuseMotif -I /usr/include/Motif1.2
  94. KIT_LIBS = -L/usr/lib/Motif1.2 -lXm $(XMULIB) $(XTOOLLIB) $(XLIB)
  95. # KIT_OPTION = -DuseMotif
  96. # KIT_LIBS = -lXm $(XTOOLLIB)
  97. KIT_OBJS = Xm-main.o
  98. DEPLIBS = $(DEPXLIB)
  99. #endif
  100. #ifdef useXview
  101. KIT_OPTION = -DuseXview -I/usr/openwin/include
  102. KIT_LIBS = -L/usr/openwin/lib -lxview -lolgx $(XMULIB) $(XLIB)
  103. KIT_OBJS = Xv-main.o Xv-events.o
  104. #endif
  105.  
  106. #ifdef USE_ONLINEHELP
  107. HELP_OPTION = -DONLINE_HELP
  108. #else
  109. HELP_OPTION =
  110. #endif
  111. #ifdef USE_ROUND_CARDS
  112. ROUND_OPTION = # -DNO_ROUND_CARDS
  113. #else
  114. ROUND_OPTION =
  115. #endif
  116. #ifdef USE_SOUND
  117. SOUND_OPTION = -DSOUND
  118. #else
  119. SOUND_OPTION =
  120. #endif
  121. #ifdef USE_LOADCARDS
  122. LOAD_OPTION = -DLOADCARDS
  123. #else
  124. LOAD_OPTION =
  125. #endif
  126. #ifdef USE_XPM
  127. XPM_OPTION = $(XPMINCLUDE)
  128. #else
  129. XPM_OPTION = -DNO_XPM
  130. XPM_LIB =
  131. #endif
  132. #ifdef USE_CARD_CONSTRUCTION
  133. GFXOBJ = X-gfx2.o
  134. GFX_OPTION = -DGFX2
  135. #else
  136. GFXOBJ = X-gfx1.o
  137. GFX_OPTION = -DGFX1
  138. #endif
  139.  
  140.  
  141. LOCAL_LIBRARIES = $(XPMLIB) $(KIT_LIBS)
  142.  
  143.  
  144. VER=1.04
  145.  
  146. XOBJS    = X-events.o X-layout.o X-expose.o X-cards.o \
  147.        X-markcard.o X-arrows.o X-widget.o $(GFXOBJ)
  148. STDOBJS =  rules.o commands.o messages.o hints.o \
  149.        loadsave.o util.o moves.o $(SOUNDOBJ) \
  150.        r_Klondike.o r_Spider.o r_Delight.o r_MonteCarlo.o r_Midnight.o \
  151.            r_Gypsy.o r_Seahaven.o r_FreeCell.o r_Calculatio.o r_Michaels.o \
  152.        r_Royal.o r_Canfield.o r_mdCanfield.o r_Bakers.o
  153.  
  154. OBJS = $(STDOBJS) $(XOBJS) $(KIT_OBJS)
  155. MYPROG = xpat2
  156. LANGUAGES = italian german russian french
  157. DEFINES =  $(LOAD_OPTION) $(HELP_OPTION) $(KIT_OPTION) $(ROUND_OPTION) \
  158.     $(SOUND_OPTION) $(XPM_OPTION) $(GFX_OPTION) \
  159.     -DSCOREFILE=\"$(SCOREFILE)\" -DLIBDIR=\"$(XPATLIBDIR)\"
  160.  
  161. # Dependencies:
  162. # *.c  require  version.h xpat.h xpatgame.h
  163. # X*.c additionally require X-pat.h and Tableau.h
  164. # X-widget.c additionally requires TableauP.h
  165.  
  166. all::    $(MYPROG)
  167.  
  168. install:: $(MYPROGS)
  169.     mkdirhier $(XPATLIBDIR)
  170.     chmod 755 $(XPATLIBDIR)
  171.     for f in $(LANGUAGES); do \
  172.       mkdirhier $(APPDEFSDIR)/$$f/app-defaults; \
  173.       cp ../lib/$$f/XPat $(APPDEFSDIR)/$$f/app-defaults; \
  174.       chmod 755 $(APPDEFSDIR)/$$f/app-defaults; \
  175.       chmod 644 $(APPDEFSDIR)/$$f/app-defaults/XPat; \
  176.     done 
  177.     (cd ../lib; tar cf - * | (cd $(XPATLIBDIR); tar xf -))
  178.     chown -R root $(XPATLIBDIR)
  179.     chmod -R a+r $(XPATLIBDIR)
  180.     for f in $(LANGUAGES); do \
  181.         chmod 755 $(XPATLIBDIR)/$$f; \
  182.     done
  183.     mkdirhier $(XPATMANDIR)
  184.     cp xpat2.man $(XPATMANDIR)/xpat2.6x
  185.     chmod 644 $(XPATMANDIR)/xpat2.6x
  186.  
  187. ComplexProgramTarget($(MYPROG))
  188. InstallAppDefaults(XPat)
  189.  
  190. install.fsstnd:
  191.     $(MAKE) install
  192.     mkdirhier /usr/games/bin
  193.     chmod 755 /usr/games/bin
  194.     mv $(BINDIR)/xpat2 /usr/games/bin
  195.  
  196. install.local: $(MYPROGS)
  197.     mkdirhier $(LXPATBINDIR) $(LXPATMANDIR) $(XPATLIBDIR) $(LAPPDEFSDIR)/app-defaults
  198.     chmod 755 $(XPATLIBDIR) $(LXPATMANDIR) $(LAPPDEFSDIR)/app-defaults
  199.     for f in $(LANGUAGES); do \
  200.       mkdirhier $(LAPPDEFSDIR)/$$f/app-defaults; \
  201.       cp ../lib/$$f/XPat $(LAPPDEFSDIR)/$$f/app-defaults; \
  202.       chmod 755 $(LAPPDEFSDIR)/$$f/app-defaults; \
  203.       chmod 644 $(LAPPDEFSDIR)/$$f/app-defaults/XPat; \
  204.     done 
  205.     cp XPat.ad $(LAPPDEFSDIR)/app-defaults/XPat
  206.     chmod 755 $(LAPPDEFSDIR)/app-defaults/XPat
  207.     (cd ../lib; tar cf - * | (cd $(XPATLIBDIR); tar xf -))
  208.     chmod -R a+r $(XPATLIBDIR)
  209.     for f in $(LANGUAGES); do \
  210.         chmod 755 $(XPATLIBDIR)/$$f; \
  211.     done
  212.     cp xpat2 $(LXPATBINDIR)
  213.     chmod 755 $(LXPATBINDIR)/xpat2
  214.     cp xpat2.man $(LXPATMANDIR)/xpat2.6x
  215.     chmod 644 $(LXPATMANDIR)/xpat2.6x
  216.  
  217.